import http from '../utils/request'

export function productListRequest(count = 2, limitNum = 20) {
  return http({
    url: '/api/pro/list',
    method: 'get',
    params: { count, limitNum },
  })
}

export function productDetailRequest(proid) {
  //http()返回的是一个promise对象--这个对象记录 ajax请求状态
  return http({
    url: '/api/pro/detail/' + proid,
    method: 'get',
  })
}

export function getSearchList( count, limitNum, keyword){
  return http({
    url: '/api/pro/search',
    method: 'get',
    params: { count, limitNum, keyword },
  });
};
